3.1.94 \(\int \frac {\sin ^7(c+d x)}{(a+b \sin ^2(c+d x))^2} \, dx\) [94]

3.1.94.1 Optimal result
3.1.94.2 Mathematica [C] (verified)
3.1.94.3 Rubi [A] (verified)
3.1.94.4 Maple [A] (verified)
3.1.94.5 Fricas [B] (verification not implemented)
3.1.94.6 Sympy [F(-1)]
3.1.94.7 Maxima [A] (verification not implemented)
3.1.94.8 Giac [B] (verification not implemented)
3.1.94.9 Mupad [B] (verification not implemented)

3.1.94.1 Optimal result

Integrand size = 23, antiderivative size = 128 \[ \int \frac {\sin ^7(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=-\frac {a^2 (5 a+6 b) \text {arctanh}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 b^{7/2} (a+b)^{3/2} d}+\frac {(2 a-b) \cos (c+d x)}{b^3 d}+\frac {\cos ^3(c+d x)}{3 b^2 d}+\frac {a^3 \cos (c+d x)}{2 b^3 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )} \]

output
-1/2*a^2*(5*a+6*b)*arctanh(cos(d*x+c)*b^(1/2)/(a+b)^(1/2))/b^(7/2)/(a+b)^( 
3/2)/d+(2*a-b)*cos(d*x+c)/b^3/d+1/3*cos(d*x+c)^3/b^2/d+1/2*a^3*cos(d*x+c)/ 
b^3/(a+b)/d/(a+b-b*cos(d*x+c)^2)
 
3.1.94.2 Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 1.31 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.52 \[ \int \frac {\sin ^7(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {-\frac {6 a^2 (5 a+6 b) \arctan \left (\frac {\sqrt {b}-i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )}{(-a-b)^{3/2}}-\frac {6 a^2 (5 a+6 b) \arctan \left (\frac {\sqrt {b}+i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )}{(-a-b)^{3/2}}+\sqrt {b} \left (\cos (c+d x) \left (24 a-9 b+\frac {12 a^3}{(a+b) (2 a+b-b \cos (2 (c+d x)))}\right )+b \cos (3 (c+d x))\right )}{12 b^{7/2} d} \]

input
Integrate[Sin[c + d*x]^7/(a + b*Sin[c + d*x]^2)^2,x]
 
output
((-6*a^2*(5*a + 6*b)*ArcTan[(Sqrt[b] - I*Sqrt[a]*Tan[(c + d*x)/2])/Sqrt[-a 
 - b]])/(-a - b)^(3/2) - (6*a^2*(5*a + 6*b)*ArcTan[(Sqrt[b] + I*Sqrt[a]*Ta 
n[(c + d*x)/2])/Sqrt[-a - b]])/(-a - b)^(3/2) + Sqrt[b]*(Cos[c + d*x]*(24* 
a - 9*b + (12*a^3)/((a + b)*(2*a + b - b*Cos[2*(c + d*x)]))) + b*Cos[3*(c 
+ d*x)]))/(12*b^(7/2)*d)
 
3.1.94.3 Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.95, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 3665, 300, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sin ^7(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin (c+d x)^7}{\left (a+b \sin (c+d x)^2\right )^2}dx\)

\(\Big \downarrow \) 3665

\(\displaystyle -\frac {\int \frac {\left (1-\cos ^2(c+d x)\right )^3}{\left (-b \cos ^2(c+d x)+a+b\right )^2}d\cos (c+d x)}{d}\)

\(\Big \downarrow \) 300

\(\displaystyle -\frac {\int \left (-\frac {\cos ^2(c+d x)}{b^2}+\frac {a^2 (2 a+3 b)-3 a^2 b \cos ^2(c+d x)}{b^3 \left (-b \cos ^2(c+d x)+a+b\right )^2}-\frac {2 a-b}{b^3}\right )d\cos (c+d x)}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {-\frac {a^3 \cos (c+d x)}{2 b^3 (a+b) \left (a-b \cos ^2(c+d x)+b\right )}+\frac {a^2 (5 a+6 b) \text {arctanh}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 b^{7/2} (a+b)^{3/2}}-\frac {(2 a-b) \cos (c+d x)}{b^3}-\frac {\cos ^3(c+d x)}{3 b^2}}{d}\)

input
Int[Sin[c + d*x]^7/(a + b*Sin[c + d*x]^2)^2,x]
 
output
-(((a^2*(5*a + 6*b)*ArcTanh[(Sqrt[b]*Cos[c + d*x])/Sqrt[a + b]])/(2*b^(7/2 
)*(a + b)^(3/2)) - ((2*a - b)*Cos[c + d*x])/b^3 - Cos[c + d*x]^3/(3*b^2) - 
 (a^3*Cos[c + d*x])/(2*b^3*(a + b)*(a + b - b*Cos[c + d*x]^2)))/d)
 

3.1.94.3.1 Defintions of rubi rules used

rule 300
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Int 
[PolynomialDivide[(a + b*x^2)^p, (c + d*x^2)^(-q), x], x] /; FreeQ[{a, b, c 
, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && ILtQ[q, 0] && GeQ[p, -q]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3665
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^ 
(p_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f 
Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos[e + 
 f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]
 
3.1.94.4 Maple [A] (verified)

Time = 1.60 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.91

method result size
derivativedivides \(\frac {\frac {\frac {b \left (\cos ^{3}\left (d x +c \right )\right )}{3}+2 \cos \left (d x +c \right ) a -\cos \left (d x +c \right ) b}{b^{3}}-\frac {a^{2} \left (-\frac {a \cos \left (d x +c \right )}{2 \left (a +b \right ) \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}+\frac {\left (5 a +6 b \right ) \operatorname {arctanh}\left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \left (a +b \right ) \sqrt {\left (a +b \right ) b}}\right )}{b^{3}}}{d}\) \(116\)
default \(\frac {\frac {\frac {b \left (\cos ^{3}\left (d x +c \right )\right )}{3}+2 \cos \left (d x +c \right ) a -\cos \left (d x +c \right ) b}{b^{3}}-\frac {a^{2} \left (-\frac {a \cos \left (d x +c \right )}{2 \left (a +b \right ) \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}+\frac {\left (5 a +6 b \right ) \operatorname {arctanh}\left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \left (a +b \right ) \sqrt {\left (a +b \right ) b}}\right )}{b^{3}}}{d}\) \(116\)
risch \(\frac {{\mathrm e}^{3 i \left (d x +c \right )}}{24 b^{2} d}+\frac {a \,{\mathrm e}^{i \left (d x +c \right )}}{b^{3} d}-\frac {3 \,{\mathrm e}^{i \left (d x +c \right )}}{8 b^{2} d}+\frac {{\mathrm e}^{-i \left (d x +c \right )} a}{b^{3} d}-\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )}}{8 b^{2} d}+\frac {{\mathrm e}^{-3 i \left (d x +c \right )}}{24 b^{2} d}-\frac {a^{3} \left ({\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}\right )}{b^{3} \left (a +b \right ) d \left (b \,{\mathrm e}^{4 i \left (d x +c \right )}-4 a \,{\mathrm e}^{2 i \left (d x +c \right )}-2 b \,{\mathrm e}^{2 i \left (d x +c \right )}+b \right )}-\frac {5 i a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{4 \sqrt {-a b -b^{2}}\, \left (a +b \right ) d \,b^{3}}-\frac {3 i a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{2 \sqrt {-a b -b^{2}}\, \left (a +b \right ) d \,b^{2}}+\frac {5 i a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{4 \sqrt {-a b -b^{2}}\, \left (a +b \right ) d \,b^{3}}+\frac {3 i a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{2 \sqrt {-a b -b^{2}}\, \left (a +b \right ) d \,b^{2}}\) \(450\)

input
int(sin(d*x+c)^7/(a+b*sin(d*x+c)^2)^2,x,method=_RETURNVERBOSE)
 
output
1/d*(1/b^3*(1/3*b*cos(d*x+c)^3+2*cos(d*x+c)*a-cos(d*x+c)*b)-1/b^3*a^2*(-1/ 
2*a/(a+b)*cos(d*x+c)/(a+b-b*cos(d*x+c)^2)+1/2*(5*a+6*b)/(a+b)/((a+b)*b)^(1 
/2)*arctanh(b*cos(d*x+c)/((a+b)*b)^(1/2))))
 
3.1.94.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 252 vs. \(2 (117) = 234\).

Time = 0.31 (sec) , antiderivative size = 529, normalized size of antiderivative = 4.13 \[ \int \frac {\sin ^7(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\left [\frac {4 \, {\left (a^{2} b^{3} + 2 \, a b^{4} + b^{5}\right )} \cos \left (d x + c\right )^{5} + 4 \, {\left (5 \, a^{3} b^{2} + 6 \, a^{2} b^{3} - 3 \, a b^{4} - 4 \, b^{5}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (5 \, a^{4} + 11 \, a^{3} b + 6 \, a^{2} b^{2} - {\left (5 \, a^{3} b + 6 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {a b + b^{2}} \log \left (-\frac {b \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a b + b^{2}} \cos \left (d x + c\right ) + a + b}{b \cos \left (d x + c\right )^{2} - a - b}\right ) - 6 \, {\left (5 \, a^{4} b + 11 \, a^{3} b^{2} + 6 \, a^{2} b^{3} - 2 \, a b^{4} - 2 \, b^{5}\right )} \cos \left (d x + c\right )}{12 \, {\left ({\left (a^{2} b^{5} + 2 \, a b^{6} + b^{7}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{3} b^{4} + 3 \, a^{2} b^{5} + 3 \, a b^{6} + b^{7}\right )} d\right )}}, \frac {2 \, {\left (a^{2} b^{3} + 2 \, a b^{4} + b^{5}\right )} \cos \left (d x + c\right )^{5} + 2 \, {\left (5 \, a^{3} b^{2} + 6 \, a^{2} b^{3} - 3 \, a b^{4} - 4 \, b^{5}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (5 \, a^{4} + 11 \, a^{3} b + 6 \, a^{2} b^{2} - {\left (5 \, a^{3} b + 6 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {-a b - b^{2}} \arctan \left (\frac {\sqrt {-a b - b^{2}} \cos \left (d x + c\right )}{a + b}\right ) - 3 \, {\left (5 \, a^{4} b + 11 \, a^{3} b^{2} + 6 \, a^{2} b^{3} - 2 \, a b^{4} - 2 \, b^{5}\right )} \cos \left (d x + c\right )}{6 \, {\left ({\left (a^{2} b^{5} + 2 \, a b^{6} + b^{7}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{3} b^{4} + 3 \, a^{2} b^{5} + 3 \, a b^{6} + b^{7}\right )} d\right )}}\right ] \]

input
integrate(sin(d*x+c)^7/(a+b*sin(d*x+c)^2)^2,x, algorithm="fricas")
 
output
[1/12*(4*(a^2*b^3 + 2*a*b^4 + b^5)*cos(d*x + c)^5 + 4*(5*a^3*b^2 + 6*a^2*b 
^3 - 3*a*b^4 - 4*b^5)*cos(d*x + c)^3 - 3*(5*a^4 + 11*a^3*b + 6*a^2*b^2 - ( 
5*a^3*b + 6*a^2*b^2)*cos(d*x + c)^2)*sqrt(a*b + b^2)*log(-(b*cos(d*x + c)^ 
2 - 2*sqrt(a*b + b^2)*cos(d*x + c) + a + b)/(b*cos(d*x + c)^2 - a - b)) - 
6*(5*a^4*b + 11*a^3*b^2 + 6*a^2*b^3 - 2*a*b^4 - 2*b^5)*cos(d*x + c))/((a^2 
*b^5 + 2*a*b^6 + b^7)*d*cos(d*x + c)^2 - (a^3*b^4 + 3*a^2*b^5 + 3*a*b^6 + 
b^7)*d), 1/6*(2*(a^2*b^3 + 2*a*b^4 + b^5)*cos(d*x + c)^5 + 2*(5*a^3*b^2 + 
6*a^2*b^3 - 3*a*b^4 - 4*b^5)*cos(d*x + c)^3 - 3*(5*a^4 + 11*a^3*b + 6*a^2* 
b^2 - (5*a^3*b + 6*a^2*b^2)*cos(d*x + c)^2)*sqrt(-a*b - b^2)*arctan(sqrt(- 
a*b - b^2)*cos(d*x + c)/(a + b)) - 3*(5*a^4*b + 11*a^3*b^2 + 6*a^2*b^3 - 2 
*a*b^4 - 2*b^5)*cos(d*x + c))/((a^2*b^5 + 2*a*b^6 + b^7)*d*cos(d*x + c)^2 
- (a^3*b^4 + 3*a^2*b^5 + 3*a*b^6 + b^7)*d)]
 
3.1.94.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\sin ^7(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\text {Timed out} \]

input
integrate(sin(d*x+c)**7/(a+b*sin(d*x+c)**2)**2,x)
 
output
Timed out
 
3.1.94.7 Maxima [A] (verification not implemented)

Time = 0.36 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.20 \[ \int \frac {\sin ^7(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {\frac {6 \, a^{3} \cos \left (d x + c\right )}{a^{2} b^{3} + 2 \, a b^{4} + b^{5} - {\left (a b^{4} + b^{5}\right )} \cos \left (d x + c\right )^{2}} + \frac {3 \, {\left (5 \, a + 6 \, b\right )} a^{2} \log \left (\frac {b \cos \left (d x + c\right ) - \sqrt {{\left (a + b\right )} b}}{b \cos \left (d x + c\right ) + \sqrt {{\left (a + b\right )} b}}\right )}{{\left (a b^{3} + b^{4}\right )} \sqrt {{\left (a + b\right )} b}} + \frac {4 \, {\left (b \cos \left (d x + c\right )^{3} + 3 \, {\left (2 \, a - b\right )} \cos \left (d x + c\right )\right )}}{b^{3}}}{12 \, d} \]

input
integrate(sin(d*x+c)^7/(a+b*sin(d*x+c)^2)^2,x, algorithm="maxima")
 
output
1/12*(6*a^3*cos(d*x + c)/(a^2*b^3 + 2*a*b^4 + b^5 - (a*b^4 + b^5)*cos(d*x 
+ c)^2) + 3*(5*a + 6*b)*a^2*log((b*cos(d*x + c) - sqrt((a + b)*b))/(b*cos( 
d*x + c) + sqrt((a + b)*b)))/((a*b^3 + b^4)*sqrt((a + b)*b)) + 4*(b*cos(d* 
x + c)^3 + 3*(2*a - b)*cos(d*x + c))/b^3)/d
 
3.1.94.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 322 vs. \(2 (117) = 234\).

Time = 0.48 (sec) , antiderivative size = 322, normalized size of antiderivative = 2.52 \[ \int \frac {\sin ^7(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {\frac {3 \, {\left (5 \, a^{3} + 6 \, a^{2} b\right )} \arctan \left (\frac {b \cos \left (d x + c\right ) + a + b}{\sqrt {-a b - b^{2}} \cos \left (d x + c\right ) + \sqrt {-a b - b^{2}}}\right )}{{\left (a b^{3} + b^{4}\right )} \sqrt {-a b - b^{2}}} + \frac {6 \, {\left (a^{3} - \frac {a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {2 \, a^{2} b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )}}{{\left (a b^{3} + b^{4}\right )} {\left (a - \frac {2 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {4 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}} - \frac {8 \, {\left (3 \, a - b - \frac {6 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {3 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}}{b^{3} {\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1\right )}^{3}}}{6 \, d} \]

input
integrate(sin(d*x+c)^7/(a+b*sin(d*x+c)^2)^2,x, algorithm="giac")
 
output
1/6*(3*(5*a^3 + 6*a^2*b)*arctan((b*cos(d*x + c) + a + b)/(sqrt(-a*b - b^2) 
*cos(d*x + c) + sqrt(-a*b - b^2)))/((a*b^3 + b^4)*sqrt(-a*b - b^2)) + 6*(a 
^3 - a^3*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 2*a^2*b*(cos(d*x + c) - 1 
)/(cos(d*x + c) + 1))/((a*b^3 + b^4)*(a - 2*a*(cos(d*x + c) - 1)/(cos(d*x 
+ c) + 1) - 4*b*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + a*(cos(d*x + c) - 
1)^2/(cos(d*x + c) + 1)^2)) - 8*(3*a - b - 6*a*(cos(d*x + c) - 1)/(cos(d*x 
 + c) + 1) + 3*b*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 3*a*(cos(d*x + c) 
 - 1)^2/(cos(d*x + c) + 1)^2)/(b^3*((cos(d*x + c) - 1)/(cos(d*x + c) + 1) 
- 1)^3))/d
 
3.1.94.9 Mupad [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.96 \[ \int \frac {\sin ^7(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {\cos \left (c+d\,x\right )\,\left (\frac {2\,\left (a+b\right )}{b^3}-\frac {3}{b^2}\right )}{d}+\frac {{\cos \left (c+d\,x\right )}^3}{3\,b^2\,d}+\frac {a^3\,\cos \left (c+d\,x\right )}{2\,d\,\left (a+b\right )\,\left (-b^4\,{\cos \left (c+d\,x\right )}^2+b^4+a\,b^3\right )}-\frac {a^2\,\mathrm {atanh}\left (\frac {\sqrt {b}\,\cos \left (c+d\,x\right )}{\sqrt {a+b}}\right )\,\left (5\,a+6\,b\right )}{2\,b^{7/2}\,d\,{\left (a+b\right )}^{3/2}} \]

input
int(sin(c + d*x)^7/(a + b*sin(c + d*x)^2)^2,x)
 
output
(cos(c + d*x)*((2*(a + b))/b^3 - 3/b^2))/d + cos(c + d*x)^3/(3*b^2*d) + (a 
^3*cos(c + d*x))/(2*d*(a + b)*(a*b^3 + b^4 - b^4*cos(c + d*x)^2)) - (a^2*a 
tanh((b^(1/2)*cos(c + d*x))/(a + b)^(1/2))*(5*a + 6*b))/(2*b^(7/2)*d*(a + 
b)^(3/2))